package com.gztms.blogmgnt.controller;

import com.gztms.blogmgnt.service.BlogTypeService;
import com.gztms.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Zoey
 * @date 2023/5/1 17:07
 * @Description TODO
 **/
@RestController
@RequestMapping("/blog/type")
public class BlogTypeController {

    @Autowired
    private BlogTypeService blogTypeService;

    /**
     * 查询全部文章类别
     * @return
     */
    @GetMapping("/getTypeList")
    public ResultUtil getAllTypes() {
        return blogTypeService.getTypeList();
    }
}
